home *** CD-ROM | disk | FTP | other *** search
/ MacUser Mac Bin 40 / MACUSER-MACBIN40A-1997-03.ISO.7z / MACUSER-MACBIN40A-1997-03.ISO / DEMO / SecretsJ DEMO / KING.DIR / 00352_Script_352 < prev    next >
Text File  |  1996-12-04  |  3KB  |  133 lines

  1. on startMovie
  2.   global mylist,lightstate,doors,eggwater,clock
  3.   set mylist = []
  4.   set clock = 0
  5.   sdset
  6. end
  7.  
  8. on stopmovie
  9.   sdsv
  10. end
  11.  
  12. on idle
  13.     set tsp = checkcur(43)
  14.   case tsp of
  15.     38:docur(2)
  16.     39:docur(3)
  17.     40:docur(1)
  18.     41:docur(4)
  19.     42:docur(5)
  20.     43:docur(5)
  21.     -1:docur(0)
  22.   end case
  23.  
  24.   chmenu
  25.   
  26. end idle
  27.  
  28. on push spriten, cstn, nstn
  29.   
  30.   if the membernum of sprite spriten = cstn then
  31.     puppetsound "push"
  32.     set the membernum of sprite spriten = nstn
  33.     updatestage
  34.   else
  35.     puppetsound "push"
  36.     set the membernum of sprite spriten = cstn
  37.     
  38.     updatestage
  39.   end if
  40.   
  41. end push
  42.  
  43. on pushtile spriten, cstn, nstn,mid
  44.   
  45.   puppetsound "flip"
  46.   set temp = the membernum of sprite spriten
  47.   set the membernum of sprite spriten = mid
  48.   updatestage
  49.   starttimer
  50.   repeat while the timer <5
  51.     nothing
  52.   end repeat
  53.   
  54.   if temp = cstn then
  55.     set the membernum of sprite spriten = nstn
  56.     updatestage
  57.   else
  58.     set the membernum of sprite spriten = cstn
  59.     updatestage
  60.   end if
  61.   
  62. end pushtile
  63.  
  64. on checkwin
  65.   global eggwater
  66.   set broken = false
  67.   repeat with i = 2 to 33
  68.     if i = 6 or i = 8 or i =13 or i =20 or i =24 or i =28 or i =32 then
  69.       nothing
  70.     else 
  71.       if the membernum of sprite i > 835 then
  72.         set broken = true
  73.         exit repeat
  74.       end if
  75.     end if
  76.     
  77.   end repeat
  78.   if broken = false then
  79.     if the membernum of sprite 20 = 865 then 
  80.       if the membernum of sprite 32 = 869 then
  81.         if the membernum of sprite 24 = 877 then
  82.           if the membernum of sprite 28 = 873 then
  83.             if the membernum of sprite 34 = 702 then
  84.               if the membernum of sprite 6 = 840 then
  85.                 if the membernum of sprite 8 = 842 then
  86.                   if the membernum of sprite 13 = 847 then
  87.                     
  88.                     
  89.                     puppetsound 3,910
  90.                     updatestage
  91.                     slow(20)
  92.                     repeat with i = 2 to 34 
  93.                       puppetsprite i,false
  94.                     end repeat
  95.                     
  96.                     puppettransition 51,1,12,true
  97.                     go to the frame + 1
  98.                     set eggwater = true
  99.                     puppetsound "open egg"
  100.                   end if
  101.                 end if
  102.               end if
  103.             end if
  104.           end if
  105.         end if
  106.       end if
  107.     end if
  108.   end if
  109.   
  110. end checkwin
  111.  
  112. on typewriter
  113.   set stroke = the key
  114.   set ln to length(field 915)
  115.   if chartonum(stroke) <> 8 then
  116.     put stroke after char ln of field 915
  117.     put "*" before char 1 of field 921
  118.     set the loch of sprite 2 = the loch of sprite 2 + 17
  119.     updatestage
  120.   else
  121.     if ln < 1 then 
  122.       set the loch of sprite 2 to 20
  123.       nothing
  124.     else
  125.       delete the last char of field 915
  126.       delete the last char of field 921
  127.       set the loch of sprite 2 = the loch of sprite 2 - 17
  128.       updatestage
  129.     end if
  130.   end if
  131.   
  132. end 
  133.